package com.slipper.sfts.broker.front;

import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

import com.slipper.common.bo.Result;
import com.slipper.common.util.ResultUtil;
import com.slipper.sfts.api.broker.bo.BrokerAccountBO;
import com.slipper.sfts.api.broker.service.IBrokerAccountSv;
import com.slipper.sfts.broker.service.BrokerAccountService;

import java.util.List;

@RestController
public class BrokerAccountSv implements IBrokerAccountSv {
    @Resource
    private BrokerAccountService brokerAccountService;
    
    @Override
    public Result<BrokerAccountBO> queryBy(String id) {
        return ResultUtil.successResult(brokerAccountService.queryBy(id));
    }

    @Override
    public Result<List<BrokerAccountBO>> queryList(BrokerAccountBO bo) {
        return ResultUtil.successResult(brokerAccountService.queryList(bo));
    }
    
    @Override
    public Result<List<BrokerAccountBO>> queryPage(BrokerAccountBO bo) {
        return ResultUtil.successResult(brokerAccountService.queryPage(bo));
    }
    
    @Override
    public Result<?> save(BrokerAccountBO bo) {
        return ResultUtil.saveResult(brokerAccountService.save(bo), bo);
    }
    
    @Override
    public Result<?> delete(BrokerAccountBO bo) {
        return ResultUtil.deleteResult(brokerAccountService.delete(bo));
    }
}
